﻿<%@ Page Title="Employees (Without Account)" Language="C#" MasterPageFile="~/SysAdmin/MasterPage_SysAdmin.master" AutoEventWireup="true" CodeBehind="EmployeeWithoutAccount.aspx.cs" Inherits="Ones.SysAdmin.EmployeeWithoutAccountList" %>

<%@ Register TagPrefix="uc" TagName="Pager" Src="~/Utils/UserControls/Pager.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server"> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphMain" runat="server">
    <div class="row">
        <div class="col-lg-12">
            <div class="widget">
                <div class="widget-header">
                    <i class="icon-table"></i>
                    <h3>
                        Employees (No Account)
                    </h3>
                    <div class="dataTables_filter" id="example_filter">
                        <asp:DropDownList runat="server" class="form-control required" Style="width: 160px; display: inline;" ID="ddlSearchBy">
                            <asp:ListItem Value="name" Text="Search by name"></asp:ListItem>
                            <asp:ListItem Value="empId" Text="Search by ID"></asp:ListItem>
                        </asp:DropDownList>
                        <asp:TextBox runat="server" ID="txtSearch" style="height: 40px; margin-top: 10px; margin-right: 7px;" aria-controls="example"></asp:TextBox>
                        <asp:Button runat="server" Text="Search" ID="btnSearch" class="btn btn-sm btn-default" style="margin-right: 10px;" onclick="btnSearch_Click"/>
                    </div>
                </div>
                <div class="widget-content">
                    <div class="example_alt_pagination">
                        <div id="container">
                            <div class="full_width big"> </div>
                            <div id="demo">
                                <!--------- CONTENT TABLE ------------->
                                <asp:Repeater ID="employeeList" runat="server" OnItemCommand="employeeList_ItemCommand">
                                    <HeaderTemplate>
                                        <table class="display data-table">
                                            <thead>
                                                <tr>
                                                    <th>
                                                        Employee ID
                                                    </th>
                                                    <th>
                                                        Name
                                                    </th>
                                                    <th>
                                                        Gender
                                                    </th>
                                                    <th>
                                                        Action
                                                    </th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <tr class='<%#Container.ItemIndex % 2 == 0 ? "gradeA odd" : "gradeA even" %>'>
                                            <td>
                                            <%#DataBinder.Eval(Container.DataItem, "empId") %>
                                            </td>
                                            <td>
                                            <%#DataBinder.Eval(Container.DataItem, "empFirstName") %>
                                            <%#DataBinder.Eval(Container.DataItem, "empLastName") %>
                                            </td>
                                            <td>
                                            <%# (bool)DataBinder.Eval(Container.DataItem, "empGender") == true ? "Male &#9794" : "Female &#9792"%>
                                            </td>
                                            <td class="hidden-xs">
                                                <asp:Button Visible='<%#DataBinder.Eval(Container.DataItem, "userId") == null ? true : false %>' class="btn btn-sm btn-primary" runat="server" Text="Create Account" CommandName="create" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "empId") %>' UseSubmitBehavior="false"/>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        </tbody> </table>
                                    </FooterTemplate>
                                </asp:Repeater>                                
                                <div class="clearfix">
                                    <uc:Pager ID="pager" runat="server" Url="EmployeeWithoutAccount.aspx"/>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphScript" runat="server"> </asp:Content>
